FROM golang:latest as build
ENV GO111MODULE=on
ADD . src/

RUN cd src && make agent

FROM gluenet/ingredients:0.0.1 as ingredients

FROM docker.io/alpine

COPY --from=build /go/src/build/bin/agent /app/agent
COPY --from=ingredients /ingredients/monitor/k8s /root/.gluenet/monitor/k8s
COPY --from=ingredients /ingredients/tools/kubectl /usr/local/bin/kubectl
COPY --from=ingredients /ingredients/tools/linkerd /usr/local/bin/linkerd

# ENTRYPOINT ["/app/agent"]
